package Demo2;

public class Demo18 {
    public static void main(String[] args) throws InterruptedException {
        Object lock=new Object();

        System.out.println("wait之前");
        synchronized (lock){
            lock.wait();
        }
        System.out.println("wait之后");

    }
}
